package org.tc.client.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.tc.client.entity.Collections;
import org.tc.client.mapper.CollectionsMapper;
import org.tc.client.mapper.UsersMapper;
import org.tc.client.service.CollectionsService;

import java.util.List;

@RestController
public class CollectionsServiceImpl implements CollectionsService {

    @Autowired
    private CollectionsMapper collectionsMapper;

    @Override
    public int deleteById(Integer id) {
        int num=collectionsMapper.deleteById(id);
        return num;
    }

    @Override
    public int insert(@RequestBody Collections collections) {
        return collectionsMapper.insert(collections);
    }

    @Override
    public List<Collections> selectCollByUserId(Integer userid) {
        List<Collections> list=collectionsMapper.selectCollByUserId(userid);
        return list;
    }

    @Override
    public int updateByPrimaryKey(Collections record) {
        return 0;
    }

  }
